﻿CREATE TRIGGER Users_Tracking_Delete
ON [dbo].[Users] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.Users_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.Users_Tracking s JOIN DELETED i
    ON s.UserID = i.UserID
END














